﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using FinalProject.BL;

namespace FinalProject.UI.Controls
{
    public class JournalComboBox : System.Windows.Controls.ComboBox
    {
        public JournalComboBox()
            : base()
        {
        }

        public void GetAllItems()
        {
            IDictionary<Guid, string> items = JournalBL.GetAllCodeJournal();
            if (items.IsNullOrEmpty()) return;

            this.ItemsSource = items;
            this.DisplayMemberPath = "Value";
            this.SelectedValuePath = "Key";
        }
    }
}
